Skip to content

Conversation

benwu25
Copy link

@benwu25 benwu25 commented Oct 5, 2025

The purpose of this PR is to diff changes written in a fork of rustc as a component of a research project.
@mernst

Merged into 99ca0ae of rustc, HEAD
as of Sat Oct 4 14:57:32 2025 +0000.
@rustbot
Copy link
Collaborator

rustbot commented Oct 5, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 5, 2025
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 5, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 5, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@benwu25 benwu25 marked this pull request as draft October 5, 2025 01:45
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2025
@benwu25 benwu25 closed this Oct 5, 2025
@rust-log-analyzer
Copy link
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
+use std::io::Write as FileWrite;
 use std::mem;
+use std::sync::{LazyLock, Mutex};
 
+use ast::token::IdentIsRaw;
+use rustc_ast::mut_visit::*;
+// use rustc_ast::ast::*;
+use rustc_ast::token::{self, Delimiter, InvisibleOrigin, MetaVarKind, TokenKind};
+use rustc_ast::tokenstream::{DelimSpan, TokenStream, TokenTree};
+use rustc_ast::util::case::Case;
+use rustc_ast::{
+    *, {self as ast},
+};
+use rustc_ast_pretty::pprust;
+use rustc_errors::codes::*;
+use rustc_errors::{Applicability, PResult, StashKey, struct_span_code_err};
+use rustc_span::edit_distance::edit_distance;
+use rustc_span::edition::Edition;
+use rustc_span::{DUMMY_SP, ErrorGuaranteed, Ident, Span, Symbol, kw, source_map, sym};
+use thin_vec::{ThinVec, thin_vec};
+use tracing::debug;
+
+use super::diagnostics::{ConsumeClosingDelim, dummy_arg};
+use super::ty::{AllowPlus, RecoverQPath, RecoverReturnSign};
+use super::{
+    AttrWrapper, ExpKeywordPair, ExpTokenPair, FollowedByType, ForceCollect, Parser, PathStyle,
+    Recovered, Trailing, UsePreAttrPos,
+};
+use crate::errors::{self, FnPointerCannotBeAsync, FnPointerCannotBeConst, MacroExpandsToAdtField};
 use crate::parser::daikon_strs::{
     BOOL, CHAR, F32, F64, I8, I16, I32, I64, I128, ISIZE, STR, STRING, U8, U16, U32, U64, U128,
     UNIT, USIZE, VEC, base_impl, build_call_print_field, build_daikon_tmp_vec,
Diff in /checkout/compiler/rustc_parse/src/parser/item.rs:25:
     dtrace_print_fields_vec_epilogue, dtrace_print_fields_vec_prologue,
     dtrace_print_xfields_vec_epilogue, dtrace_print_xfields_vec_prologue, init_nonce,
 };
-use crate::{StripTokens, new_parser_from_source_str, unwrap_or_emit_fatal};
-use rustc_ast::mut_visit::*;
-use rustc_ast::*;
-use std::collections::HashMap;
---
-use rustc_errors::codes::*;
-use rustc_errors::{Applicability, PResult, StashKey, struct_span_code_err};
-use rustc_span::edit_distance::edit_distance;
-use rustc_span::edition::Edition;
-use rustc_span::{DUMMY_SP, ErrorGuaranteed, Ident, Span, Symbol, kw, source_map, sym};
-use thin_vec::{ThinVec, thin_vec};
-use tracing::debug;
-
-use super::diagnostics::{ConsumeClosingDelim, dummy_arg};
-use super::ty::{AllowPlus, RecoverQPath, RecoverReturnSign};
-use super::{
-    AttrWrapper, ExpKeywordPair, ExpTokenPair, FollowedByType, ForceCollect, Parser, PathStyle,
-    Recovered, Trailing, UsePreAttrPos,
+use crate::{
+    StripTokens, exp, fluent_generated as fluent, new_parser_from_source_str, unwrap_or_emit_fatal,
 };
-use crate::errors::{self, FnPointerCannotBeAsync, FnPointerCannotBeConst, MacroExpandsToAdtField};
-use crate::{exp, fluent_generated as fluent};
 
 // Stores the output prefix
 // E.g., foo.rs -> foo, or the name of the cargo project.
Diff in /checkout/compiler/rustc_expand/src/expand.rs:1:
+use std::collections::HashMap;
+use std::io::Write;
 use std::path::PathBuf;
 use std::rc::Rc;
-use std::sync::Arc;
+use std::sync::{Arc, LazyLock, Mutex};
 use std::{iter, mem, slice};
 
-use rustc_ast::visit::FnKind;
-#[allow(unused_imports)]
-use rustc_ast::{
-    AngleBracketedArg, Block, Expr, FieldDef, FnDecl, FnRetTy, GenericArg, GenericArgs, Item, Pat,
-    Path, VariantData,
-};
-#[allow(unused_imports)]
-use rustc_parse::parser::daikon_strs::{
-    BOOL, CHAR, F32, F64, I8, I16, I32, I64, I128, ISIZE, STR, STRING, U8, U16, U32, U64, U128,
-    UNIT, USIZE, VEC,
-};
-use rustc_parse::parser::item::{DO_VISITOR, OUTPUT_NAME};
-use std::collections::HashMap;
-use std::io::Write;
-use std::sync::{LazyLock, Mutex};
-use thin_vec::ThinVec;
-
 use rustc_ast::mut_visit::*;
 use rustc_ast::tokenstream::TokenStream;
-use rustc_ast::visit::{self, AssocCtxt, Visitor, VisitorResult, try_visit, walk_list};
+use rustc_ast::visit::{self, AssocCtxt, FnKind, Visitor, VisitorResult, try_visit, walk_list};
 use rustc_ast::{
     self as ast, AssocItemKind, AstNodeWrapper, AttrArgs, AttrStyle, AttrVec, DUMMY_NODE_ID,
     ExprKind, ForeignItemKind, HasAttrs, HasNodeId, Inline, ItemKind, MacStmtStyle, MetaItemInner,
Diff in /checkout/compiler/rustc_expand/src/expand.rs:29:
     MetaItemKind, ModKind, NodeId, PatKind, StmtKind, TyKind, token,
 };
+#[allow(unused_imports)]
+use rustc_ast::{
+    AngleBracketedArg, Block, Expr, FieldDef, FnDecl, FnRetTy, GenericArg, GenericArgs, Item, Pat,
+    Path, VariantData,
+};
 use rustc_ast_pretty::pprust;
 use rustc_attr_parsing::{AttributeParser, Early, EvalConfigResult, ShouldEmit, validate_attr};
 use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
Diff in /checkout/compiler/rustc_expand/src/expand.rs:37:
 use rustc_hir::Target;
 use rustc_hir::def::MacroKinds;
 use rustc_hir::limit::Limit;
+#[allow(unused_imports)]
+use rustc_parse::parser::daikon_strs::{
+    BOOL, CHAR, F32, F64, I8, I16, I32, I64, I128, ISIZE, STR, STRING, U8, U16, U32, U64, U128,
+    UNIT, USIZE, VEC,
+};
+use rustc_parse::parser::item::{DO_VISITOR, OUTPUT_NAME};
 use rustc_parse::parser::{
     AttemptLocalParseRecovery, CommaRecoveryMode, ForceCollect, Parser, RecoverColon, RecoverComma,
     token_descr,
Diff in /checkout/compiler/rustc_expand/src/expand.rs:47:
 use rustc_span::hygiene::SyntaxContext;
 use rustc_span::{ErrorGuaranteed, FileName, Ident, LocalExpnId, Span, Symbol, sym};
 use smallvec::SmallVec;
+use thin_vec::ThinVec;
 
 use crate::base::*;
 use crate::config::{StripUnconfigured, attr_into_trace};
Diff in /checkout/compiler/rustc_driver_impl/src/lib.rs:16:
 #![feature(try_blocks)]
 // tidy-alphabetical-end
 
-use rustc_parse::parser::item::{OUTPUT_NAME, jot_output_name};
-
 use std::cmp::max;
 use std::collections::{BTreeMap, BTreeSet};
 use std::ffi::OsString;
Diff in /checkout/compiler/rustc_driver_impl/src/lib.rs:54:
 use rustc_metadata::locator;
 use rustc_middle::ty::TyCtxt;
 use rustc_parse::lexer::StripTokens;
+use rustc_parse::parser::item::{OUTPUT_NAME, jot_output_name};
 use rustc_parse::{new_parser_from_file, new_parser_from_source_str, unwrap_or_emit_fatal};
 use rustc_session::config::{
     CG_OPTIONS, CrateType, ErrorOutputType, Input, OptionDesc, OutFileName, OutputType, Sysroot,
Diff in /checkout/daikon-tests/src/main.rs:1:
 use colored::Colorize;
 
 pub fn get_output_name(s: String) -> String {
-    let end =
-        match s.rfind(".") { // .rs
-            None => panic!("no . at the end of input file name"),
-            Some(end) => end
-        };
-    let mut start =
-        match s.rfind("/") { // .../<crate>.rs
-            None => 0,
-            Some(slash) => slash+1
-        };
+    let end = match s.rfind(".") {
+        // .rs
+        None => panic!("no . at the end of input file name"),
+        Some(end) => end,
+    };
+    let mut start = match s.rfind("/") {
+        // .../<crate>.rs
+        None => 0,
+        Some(slash) => slash + 1,
+    };
     let mut res = String::from("");
     while start < end {
         res.push_str(&format!("{}", s.chars().nth(start).unwrap()));
Diff in /checkout/daikon-tests/src/main.rs:77:
     }
 
     println!("\n{}", "All tests passed".green());
-
 }
 
 fn main() {
Diff in /checkout/daikon-tests/src/main.rs:84:
-  run_daikon_rustc_pp_tests();
+    run_daikon_rustc_pp_tests();
 }
 
Diff in /checkout/daikon-tests/test/no-semi-if-else.rs:1:
 fn test(x: i32) -> i32 {
-    if x % 2 == 0 {
-        1
-    } else {
-        2
-    }
+    if x % 2 == 0 { 1 } else { 2 }
 }
 
 fn main() {}
Diff in /checkout/daikon-tests/test/non-ret-if-else.rs:3:
  */
 
 fn boop(x: i32) -> i32 {
-    let y = 
-        if x == 12 {
-            22
-        } else {
-            19
-        };
+    let y = if x == 12 { 22 } else { 19 };
     return y;
 }
 
Diff in /checkout/daikon-tests/test/1.rs:1:
 fn main() {}
+
fmt: checked 6457 files
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Build completed unsuccessfully in 0:00:56

@jackh726 jackh726 mentioned this pull request Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants